import axios from '@/libs/request/axios'
// 获取GPS安装规则配置数据
export const getLoanGpsRuleList = (params) => {
    return axios.request({
        url: `/case/loanGpsRule/getGpsRuleList`,
        data: params,
        method: 'post'
    })
}
// 添加GPS规则
export const addRule = (params) => {
    return axios.request({
        url: `/case/loanGpsRule/addRule`,
        data:params,
        method: 'post'
    })
}

// 编辑GPS安装规则
export const editRule = (params) => {
    return axios.request({
        url: `/case/loanGpsRule/editRule`,
        data:params,
        method: 'post'
    })
}

// 删除GPS安装规则
export const delByIds = (ids,params) => {
    return axios.request({
        url:`/case/loanGpsRule/delByIds/${ids}`,
        params:params,
        method: 'delete'
    })
}

// 启用GPS安装规则
export const openRuleById = (id,params) => {
    return axios.request({
        url:`/case/loanGpsRule/openRuleById/${id}`,
        params:params,
        method: 'post'
    })
}

// 停用GPS安装规则
export const closeRuleById = (id,params) => {
    return axios.request({
        url:`/case/loanGpsRule/closeRuleById/${id}`,
        params:params,
        method: 'post'
    })
}

// 更新
export const updateRuleId = (params) => {
    return axios.request({
        url: `/case/loanGpsRule/updateRuleId`,
        data:params,
        method: 'post'
    })
}

// 规则同步
export const synchronousById = (id,params) => {
    return axios.request({
        url:`/case/loanGpsRule/synchronousById/${id}`,
        params:params,
        method: 'post'
    })
}
